package com.tjetc.dao;

import com.tjetc.entity.FriendLinks;
import com.tjetc.entity.LogisticsPartner;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * (LogisticsPartner)表数据库访问层
 *
 * @author makejava
 * @since 2025-09-19 10:34:25
 */
public interface LogisticsPartnerDao {

    List<LogisticsPartner> query(@Param("name") String name,
                            @Param("start") Integer start,
                            @Param("pageSize") Integer pageSize);

    Integer count(String name);

    LogisticsPartner findById(Long id);

    void updateById(LogisticsPartner logisticsPartner);

    void insert(LogisticsPartner logisticsPartner);

    void deleteById(Long id);

    // 1. 重置所有记录的 is_default 为 0
    void resetAllDefault();

    // 2. 将指定 partner_id 的记录设为 is_default = 1
    void setDefaultByPartnerId(@Param("partnerId") Long partnerId);
}

